#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	int n = 0;
	scanf("%d", &n);
	int i = 0, s = 0, a = 0;
	for (i = 0; i < 5; i++)
	{
		s = s * 10 + n;
		a = a + s;
	}
	printf("%d", a);

	return 0;
}